<#escape x as x?html>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>高级中学选课与学分认定系统</title>
    <link rel="stylesheet" type="text/css" href="${rc.contextPath}/resources/css/easyui.css">
    <link rel="stylesheet" type="text/css" href="${rc.contextPath}/resources/css/icon.css">
    <style type="text/css">
        * {
            font-size: 12px;
        }

        body {
            font-family: "微软雅黑";
            padding: 20px;
            font-size: 13px;
            margin: 0;
        }

        .STYLE1 {
            color: #FF0000
        }
    </style>
    <script type="text/javascript" src="${rc.contextPath}/resources/js/jquery-1.8.0.min.js"></script>
    <script type="text/javascript" src="${rc.contextPath}/resources/js/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="${rc.contextPath}/resources/js/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="${rc.contextPath}/resources/js/share.js"></script>
    <script type="text/javascript" src="${rc.contextPath}/resources/js/jquery.cookie.js"></script>
    <script type="text/javascript" src="${rc.contextPath}/resources/js/main.js"></script>
</head>
<body class="easyui-layout" data-options="fit:true">
    <#assign userType=  SPRING_SECURITY_CONTEXT.authentication.principal.user.userType>
<input id="userTypeInput" type="hidden" value="${userType}">
<input id="userIdNo" type="hidden" value="${SPRING_SECURITY_CONTEXT.authentication.principal.user.userIdNo}">

<div data-options="region:'north',border:false"
     style="height:80px;background: url('${rc.contextPath}/resources/css/images/header_background.jpg');overflow: hidden;">
    <img src="${rc.contextPath}/resources/css/images/header_logo_left.jpg"
         style="position: relative;float: left"/>
<#--头部区域-->
    <div style="color: #0000ff;font-family: '微软雅黑';float:right;height: 80px;position: relative;
            background: url('${rc.contextPath}/resources/css/images/header_logo_right.jpg') no-repeat center right">
        您好！：
        <a id="userInfo" href="#" class="easyui-linkbutton" data-options="plain:true"
           style="color: #0000ff;margin:60px 0px 0px 0px;font-family: '微软雅黑';">
        ${SPRING_SECURITY_CONTEXT.authentication.principal.user.userName}

            <#if userType==1>
                同学
            <#elseif userType==2>
                老师
            <#else>
                管理员
            </#if>
        </a>|
        <a id="modify_pass" href="#" class="easyui-linkbutton" data-options="plain:true"
           style="color: #0000ff;font-family: '微软雅黑';">修改密码</a>|


        <a id="logout" href="${rc.contextPath}/logout" class="easyui-linkbutton" data-options="plain:true"
           style="color: #0000ff;font-family: '微软雅黑';">注销</a>
    <#--<a id="about" href="#" class="easyui-linkbutton" data-options="plain:true">关于</a>-->

    </div>


</div>

<div data-options="region:'west',split:true,title:'工作空间'" style="width:180px">
<#--功能列表-->
    <div id="work_space" class="easyui-accordion" data-options="fit:true,border:true">
    <#--个人工作区-->

        <#if userType==1>
            <div data-options="selected:true,title:'学习管理'">
                <ul id="personal" class="easyui-tree" data-options="animate: true,
                data: [{text: '选课管理',attributes: {url:'electiveTable'}},
                {text: '学分认定',attributes: {url:'credit'}}]"></ul>
            </div>
        <#elseif userType==2>
            <div data-options="selected:true,title:'学习管理'">
                <ul id="personal" class="easyui-tree" data-options="animate: true,
                data: [{text: '选课管理',attributes: {url:'courseStudyManage'}}]"></ul>
            </div>
        </#if>


    <#--构造According标签-->
        <#assign catalogs= Catalogs>
        <#list catalogs as catalog>
            <div data-options="title:'${catalog.menuName}'">
            <#--构造Tree数据-->
                <#assign data_options>
                    <#list catalog.nodes as node>
                        <#if node_has_next>
                        ${"{text:'"+ node.menuName+"', attributes: {url:'"+node.menuUrl+"'}},"}
                        <#else>
                        ${"{text:'"+ node.menuName+"', attributes: {url:'"+node.menuUrl+"'}}"}
                        </#if>
                    </#list>
                </#assign>
            <#--构造树-->
                <ul class="easyui-tree" data-options="animate: true,data:[${data_options}]">
                </ul>

            </div>
        </#list>
    </div>
</div>

<div data-options="region:'center'">
<#--工作区域-->
    <div id="center_tabs" class="easyui-tabs" data-options="fit: true, border: true, headerWidth: 250,
        onClose:function(title,index){
            var currentIndex=$('#center_tabs').tabs('getTabIndex',$('#center_tabs').tabs('getSelected'));
            if(currentIndex==index){
                $('#center_tabs').tabs('select',index-1);
            }
        }">
        <div title="个人信息" data-options="closable:false,content:'正在建设中...'">
        </div>
    </div>
</div>
<div data-options="region:'south',border:true"
     style="height:40px;background: url('${rc.contextPath}/resources/css/images/header_background.jpg')">
<#--页脚区域-->
    <div style="text-align: center;color: #ffffff">
        新疆维吾尔自治区 克拉玛依市高级中学<br>
        Copyright © 2013-2014
    </div>
</div>

<#--参数配置对话框-->
<div>
    <div id="param_config_dlg" class="easyui-dialog" title="参数配置" style="width:400px;height:320px;padding:10px"
         data-options="
                iconCls: 'icon-edit',
                buttons: '#param_config_dlg_buttons',
                modal:true,
                closed:true
            ">
        <div style="padding:10px 0 10px 60px">
            <form id="param_config_form">
                <table>
                    <tr>
                        <td style="text-align: right">选课开始日期：</td>
                        <td><input name="electiveStart" id="start_date" type="text"
                                   class="easyui-datebox" required="required"/>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right">选课结束日期：</td>
                        <td><input name="electiveEnd" id="end_date" type="text"
                                   class="easyui-datebox" required="required"/></td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <hr>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right">选课学期：</td>
                        <td style="text-align: left">
                            <div><input name="term" type="radio" value="1">第一学期</div>
                            <div><input type="radio" name="term" value="2">第二学期</div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <hr>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right">选课学段：</td>
                        <td style="text-align: left">
                            <div><input type="radio" name="section" value="1">第一学段</div>
                            <div><input type="radio" name="section" value="2">第二学段</div>
                            <div><input type="radio" name="section" value="4">第三学段</div>
                        </td>
                    </tr>
                </table>
            </form>
        </div>

    </div>
    <div id="param_config_dlg_buttons">
        <a id="param_config_submit" href="#" class="easyui-linkbutton" data-options="iconCls: 'icon-ok'">提交</a>
    </div>
</div>

<#--个人资料对话框-->
<div>
    <div id="modifyInfoDialog" class="easyui-dialog" title="个人信息"
        <#if userType==1>
         style="width:280px;height:280px;padding:10px"
        <#else>
         style="width:540px;height:300px;padding:10px"
        </#if>
         data-options="
                iconCls: 'icon-edit',
                buttons: '#modify_info_dlg_buttons',
                modal:true,
                closed:true
            ">

        <form id="modifyInfoForm" method="POST">
            <input type="hidden" id="id" name="id">
            <#if userType==1>
                <input type="hidden" name="studentNumber">
                <input type="hidden" name="executiveClass">
                <input type="hidden" name="teachingClass">
            <#elseif userType==2>
                <input type="hidden" name="subject">
                <input type="hidden" name="grade">
            </#if>

            <table width="100%" cellspacing="1" cellpadding="4 1" style="text-align:center;">



                <tr>
                    <td><span class="STYLE1">*</span>姓&nbsp;&nbsp;&nbsp;&nbsp;名</td>
                    <td><input class="easyui-validatebox"
                               data-options="required:true,missingMessage:'请输入您的姓名'"
                               id="name" name="name" type="text"/></td>
                    <#if userType==2>
                        <td width="40%" rowspan="4">
                            <div id="nopicture" style="border:1px dashed green;width:150;height:150">照片</div>
                            <div id="picturepreview">
                            </div>
                        </td>
                    </#if>
                </tr>
                <tr>
                    <td><span class="STYLE1">*</span>身份证号</td>
                    <td><input class="easyui-validatebox"
                               data-options="required:true,missingMessage:'请输入您的身份证号',invalidMessage:'请输入合法的身份证号码'"
                               validType="idNoValidate"
                               id="identityCardNumber" name="identityCardNumber" type="text" maxlength="150"/>
                    </td>
                </tr>
                <tr>
                    <td><span class="STYLE1">*</span>性&nbsp;&nbsp;&nbsp;&nbsp;别</td>
                    <td><input id="sex" name="sex" type="text" maxlength="160"/></td>
                </tr>
                <tr>
                    <td>出生日期</td>
                    <td><input id="birthday" name="birthday" type="text" maxlength="156" class="easyui-datebox"
                               data-options="editable:false"/></td>
                </tr>
                <tr>
                    <td><span class="STYLE1">*</span>民&nbsp;&nbsp;&nbsp;&nbsp;族</td>
                    <td><input id="nation" name="nation" type="text" maxlength="150"/></td>
        </form>
        <#if userType==2>
            <td>
                <form id="pictureForm" method="post" enctype="multipart/form-data">
                    <input type="file" id="picture" name="picture" accept="JPG" maxlength="150">
                </form>
            </td>
        </#if>
        </tr>
        </table>
        <span id="error" class="STYLE1"></span>
    </div>
    <div id="modify_info_dlg_buttons">
        <a id="modify_info_submit" href="#" class="easyui-linkbutton" data-options="iconCls: 'icon-ok'">更新</a>
    </div>
</div>

<#--修改密码对话框-->
<div>
    <div id="modify_pass_dlg" class="easyui-dialog" title="修改密码" style="width:400px;height:210px;padding:10px"
         data-options="
                iconCls: 'icon-edit',
                buttons: '#modify_pass_dlg_buttons',
                modal:true,
                closed:true
            ">
        <div style="padding:10px 0 10px 60px">
            <form id="modify_pass_form">
                <table style="text-align: center">
                    <tr>
                        <td>旧密码：</td>
                        <td><input id="opwd" class="easyui-validatebox" type="password" name="old_pass"
                                   data-options="required:true,missingMessage:'请输入原密码',invalidMessage:'输入的原密码不正确'"
                                   validType="remote['authentication/password/valid','old_pass']"/>
                        </td>
                    </tr>
                    <tr>
                        <td>新密码：</td>
                        <td><input id="pwd" class="easyui-validatebox" type="password" name="new_pass"
                                   data-options="required:true,missingMessage:'请输入新密码',invalidMessage:'输入的密码与原密码相同'"
                                   validType="nonEquals['#opwd']"/></td>
                    </tr>
                    <tr>
                        <td>确认密码：</td>
                        <td><input id="npwd" class="easyui-validatebox" type="password" name="confirm_pass"
                                   data-options="required:true,
                                       missingMessage:'请再次输入新密码',invalidMessage:'输入的密码与新密码不相同'"
                                   validType="equals['#pwd']"></td>
                    </tr>
                </table>
            </form>
        </div>

    </div>
    <div id="modify_pass_dlg_buttons">
        <a id="modify_pass_submit" href="#" class="easyui-linkbutton" data-options="iconCls: 'icon-ok'">提交</a>
    </div>
</div>

</body>
</html>
</#escape>